<template>
  <div class="ra-site">
    <div v-for="(item, index) in lists" :key="index">
      <img src="../../../assets/images/06.png" alt />
      <div @click="atlas(item.jd, item.wd)">
        <p>{{ item.dwmc }}</p>
        <div>地址：{{ item.address }}</div>
      </div>
      <img
        @click="callPhone(item.telphone)"
        class="ec-phone"
        src="../../../assets/images/dianhua.png"
        alt
      />
    </div>
  </div>
</template>

<script>
import { Organization } from "../../../assets/js/api/user";
export default {
  name: "RegulatoryAgency",
  data() {
    return {
      lists: []
    };
  },
  created() {
    Organization().then(res => {
      console.log(res);
      let list = res.data;
      // console.log(list);
      for (let i = 0; i < list.length; i++) {
        if (list[i].lb === "1") {
          this.lists.push(list[i]);
        }
      }
      // console.log(this.lists);
    });
  },
  methods: {
    // 精度和维度
    atlas(jd, wd) {
      console.log(`精度：${jd}。维度：${wd}
      `);
    },

    // 调通手机号码，实现打电话功能
    callPhone(phoneNumber) {
      window.location.href = "tel://" + phoneNumber;
      // console.log(this.Phone);
    }
  }
};
</script>

<style></style>
